﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using DIS_DAO.DTO;
namespace DIS_DAO
{
	/// <summary>
	/// The inteface is used to interact with database
	/// </summary>
	
	public interface IDataProvider
	{
		#region FUNCTIONS
		
		List<FunctionsDTO> Functions_SelectAll();
		
		FunctionsDTO Functions_SelectByID(int id);
		
		bool Functions_Insert(FunctionsDTO obj);
		
		bool Functions_Delete(int id);
		
		bool Functions_Update(FunctionsDTO obj);

		#endregion 

		#region ROLE
		
		List<RoleDTO> Role_SelectAll();
		
		RoleDTO Role_SelectByID(int id);
		
		bool Role_Insert(RoleDTO obj);
		
		bool Role_Delete(int id);
		
		bool Role_Update(RoleDTO obj);

		#endregion 

		#region ORDERS
		
		List<OrdersDTO> Orders_SelectAll();
		
		OrdersDTO Orders_SelectByID(int id);
		
		bool Orders_Insert(ref OrdersDTO obj);
		
		bool Orders_Delete(int id);
		
		bool Orders_Update(OrdersDTO obj);
		
		List<OrdersDTO> Orders_SelectByIDChemistWareHouse(int idchemistwarehouse);
		
		List<OrdersDTO> Orders_SelectByIDCustomer(int idcustomer);
        
        List<OrdersDTO> Orders_SelectByIDChemistWareHouseAndOrderDate(int idChemistWareHouse, DateTime orderdate);

		#endregion 

		#region EMPLOYEE
		
		List<EmployeeDTO> Employee_SelectAll();
		
		EmployeeDTO Employee_SelectByID(int id);
		
		bool Employee_Insert(EmployeeDTO obj);
		
		bool Employee_Delete(int id);
		
		bool Employee_Update(EmployeeDTO obj);
		
		List<EmployeeDTO> Employee_SelectByIDRole(int idrole);
		
		List<EmployeeDTO> Employee_SelectByIDChemistWareHouse(int idchemistwarehouse);
        
        EmployeeDTO Employee_SelectByUserName(string username);
        
        EmployeeDTO Employee_SelectByUserNameAndPassword(string username, string password);

		#endregion 

		#region DAILYREPORT
		
		List<DailyReportDTO> DailyReport_SelectAll();
		
		DailyReportDTO DailyReport_SelectByID(int id);
		
		bool DailyReport_Insert(DailyReportDTO obj);
		
		bool DailyReport_Delete(int id);
		
		bool DailyReport_Update(DailyReportDTO obj);
		
		List<DailyReportDTO> DailyReport_SelectByIDChemistWareHouse(int idchemistwarehouse);
        
        DailyReportDTO DailyReport_SelectByIDChemistWareHouseAndReportDate(int idchemistwarehouse, DateTime reportdate);

		#endregion 

		#region WEEKLYREPORT
		
		List<WeeklyReportDTO> WeeklyReport_SelectAll();
		
		WeeklyReportDTO WeeklyReport_SelectByID(int id);
		
		bool WeeklyReport_Insert(WeeklyReportDTO obj);
		
		bool WeeklyReport_Delete(int id);
		
		bool WeeklyReport_Update(WeeklyReportDTO obj);
		
		List<WeeklyReportDTO> WeeklyReport_SelectByIDChemistWareHouse(int idchemistwarehouse);
        
        WeeklyReportDTO WeeklyReport_SelectByIDChemistWareHouseAndReportDate(int idChemistWareHouse, DateTime startdate, DateTime enddate);
		
        #endregion 

		#region LOCALPROMOTION
		
		List<LocalPromotionDTO> LocalPromotion_SelectAll();
		
		LocalPromotionDTO LocalPromotion_SelectByID(int id);
		
		bool LocalPromotion_Insert(LocalPromotionDTO obj);
		
		bool LocalPromotion_Delete(int id);
		
		bool LocalPromotion_Update(LocalPromotionDTO obj);
		
		List<LocalPromotionDTO> LocalPromotion_SelectByIDItem(int iditem);
		
		List<LocalPromotionDTO> LocalPromotion_SelectByIDChemistWareHouse(int idchemistwarehouse);
        
        LocalPromotionDTO LocalPromotion_SelectByIDItemAndIDChemistWareHouse(int iditem, int idchemistwarehouse);
        
        bool LocalPromotion_DeleteByIDItemAndIDChemistWareHouse(int iditem, int idChemistWareHouse);

		#endregion 

		#region ORDERDETAIL
		
		List<OrderDetailDTO> OrderDetail_SelectAll();
		
		OrderDetailDTO OrderDetail_SelectByID(int id);
		
		bool OrderDetail_Insert(OrderDetailDTO obj);
		
		bool OrderDetail_Delete(int id);
		
		bool OrderDetail_Update(OrderDetailDTO obj);
		
		List<OrderDetailDTO> OrderDetail_SelectByIDOrder(int idorder);
		
		List<OrderDetailDTO> OrderDetail_SelectByIDItem(int iditem);
        
        bool OrderDetail_DeleteByOrder(int idorder);

		#endregion 

		#region NATIONALPROMOTION
		
		List<NationalPromotionDTO> NationalPromotion_SelectAll();
		
		NationalPromotionDTO NationalPromotion_SelectByID(int id);
		
		bool NationalPromotion_Insert(NationalPromotionDTO obj);
		
		bool NationalPromotion_Delete(int id);
		
		bool NationalPromotion_Update(NationalPromotionDTO obj);
		
        NationalPromotionDTO NationalPromotion_SelectByIDItem(int iditem);

		#endregion 

		#region CART
		
		List<CartDTO> Cart_SelectAll();
		
		CartDTO Cart_SelectByID(int id);
		
		bool Cart_Insert(CartDTO obj);
		
        bool Cart_Delete(string cartid, int recordid);
		
		bool Cart_Update(CartDTO obj);
		
		List<CartDTO> Cart_SelectByItemID(int itemid);
        
        List<CartDTO> Cart_SelectByCartID(string cartid);
        
        CartDTO Cart_SelectByIDAndRecordID(string cartid, int recordid);
        
        CartDTO Cart_SelectByRecordID(int recordid);
        
        CartDTO Cart_SelectByIDAndItem(string cartid, int itemid);
        
        bool Cart_Empty(string cartid);

		#endregion 

		#region ITEM
		
		List<ItemDTO> Item_SelectAll();
		
		ItemDTO Item_SelectByID(int id);
		
		bool Item_Insert(ItemDTO obj);
		
		bool Item_Delete(int id);
		
		bool Item_Update(ItemDTO obj);
		
		List<ItemDTO> Item_SelectByIDCategory(int idcategory);

		#endregion 

		#region ROLEFUNCTIONS
		
		List<RoleFunctionsDTO> RoleFunctions_SelectAll();
		
		RoleFunctionsDTO RoleFunctions_SelectByID(int id);
		
		bool RoleFunctions_Insert(RoleFunctionsDTO obj);
		
		bool RoleFunctions_Delete(int id);
		
		bool RoleFunctions_Update(RoleFunctionsDTO obj);
		
		List<RoleFunctionsDTO> RoleFunctions_SelectByIDRole(int idrole);
		
		List<RoleFunctionsDTO> RoleFunctions_SelectByIDFunction(int idfunction);

		#endregion 

		#region CHEMISTWAREHOUSE
		
		List<ChemistWareHouseDTO> ChemistWareHouse_SelectAll();
		
		ChemistWareHouseDTO ChemistWareHouse_SelectByID(int id);
		
		bool ChemistWareHouse_Insert(ChemistWareHouseDTO obj);
		
		bool ChemistWareHouse_Delete(int id);
		
		bool ChemistWareHouse_Update(ChemistWareHouseDTO obj);

		#endregion 

		#region CUSTOMER
		
		List<CustomerDTO> Customer_SelectAll();
		
		CustomerDTO Customer_SelectByID(int id);
		
		bool Customer_Insert(CustomerDTO obj);
		
		bool Customer_Delete(int id);
		
		bool Customer_Update(CustomerDTO obj);
        
        CustomerDTO Customer_SelectByUserName(string username);
        
        CustomerDTO Customer_SelectByUserNameAndPassword(string username, string password);

		#endregion 

		#region CATEGORY
		
		List<CategoryDTO> Category_SelectAll();
		
		CategoryDTO Category_SelectByID(int id);
		
		bool Category_Insert(CategoryDTO obj);
		
		bool Category_Delete(int id);
		
		bool Category_Update(CategoryDTO obj);

		#endregion 

	}
}
